Computers are known to include a central processing unit, system memory, interconnecting buses, audio processing circuitry, video graphics processing circuitry, and peripheral ports. The peripheral ports allow the central processing unit to communicate with external peripheral devices such as monitors, printers, external tape drives, etc. If the computer system includes basic video graphic processing, the video graphics processing circuitry receives graphics data from the central processing unit and prepares it for display on the monitor. Such graphics data is generated by the central processing unit while performing an application such as word processing, desktop operation, drawing application, presentation application, spreadsheet application, etc. In many computer systems, a cursor is provided that allows the user to utilize a graphical interface to select certain objects of an application.
Currently, the cursor may be generated in hardware as a monochrome cursor or as a color cursor using AND/XOR blending. Alternatively, the cursor may be generated in software using any desired color depth or blending format. In particular, software generated color cursors using alpha blending are becoming more common and will be used more in future operating systems. For a hardware generated monochrome cursor, data is stored as 2 bits per pixel (bpp) in a frame buffer of the video graphics circuitry. As is known, the frame buffer stores video graphics data that will subsequently be displayed. The 2 bpp are representative of four codes, where “00” indicates that the cursor is to be cursor color “0”, which addresses a programmable register to retrieve the cursor color, which is normally set to black. A code of “01” indicates that the cursor is to be cursor color “1”, which addresses a second programmable register to retrieve the color, which is normally set to white. A code of “10” indicates that the cursor is to be transparent. A code of “11” indicates that the cursor is transparent with the background color inverted. As the cursor data is retrieved from the frame buffer, it is mixed, via a multiplexing function, with other video graphics data stored in the frame buffer to produce a composite image. Such a hardware implementation does not allow the monochrome cursor to be alpha blended with other video graphics data.
Current hardware generated color cursors are AND/XOR blended with other video graphics data on a pixel by pixel basis. AND/XOR blending begins by ANDing each bit of video graphics data with an ANDing bit. The resultant of each ANDing function is then exclusively ORed with a corresponding bit of the color cursor data to produce the blended data. Note that the color depth of the video graphics data and the color cursor data may be 8, 16, 24 bpp, etc. While this approach allows a color cursor to be blended with video graphics data, it does not allow alpha blending of the color cursor data with the video graphics data.
Software generation of a color cursor allows the cursor data to be alpha blended with underlying video graphics data to produce a composite image, which is stored in the frame buffer. As such, the software cursor is merged into the graphics layer. Such software alpha blending of a color cursor works well as long as the composite image is not further blended with video data (e.g., a digitized television signal). When the composite image is to be blended with video data, if the video layer is on top of the graphics layer, the cursor will be blocked. Further, if the cursor is blended with a key color (i.e., data that indicates placement of video in the display), the key color is altered, thus video data will not appear in the desired area of the display. Note that alpha blending may be performed on a pixel-by-pixel basis using a pre-multiplied, or associated, alpha blend equation of P=(1-alpha)*graphics data (R,G,B)+cursor data (R, G, B,) or an non-premultiplied alpha equation of P=(1-alpha)*graphics data+alpha*cursor data, where P equals the result pixel data, and where alpha is based on opacity.
Therefore, a need exists for a video graphics module that is backwards compatible with existing cursor implementations and is also capable of alpha blending multiple image layers wherein at least one of the image layers includes video data without the limitations of monochrome cursors, hardware color cursors using AND/XOR blending, and software color cursors.